<include file="header" />
<style type="text/css">
  body{background-color: #f1f1f1;}
</style>
<div id="content">
  <div id="weiba" data-title="论坛" class="panel" data-selected="true"  data-menu="msgmenu" style="padding:0;">
    <header>
        <div id="header-buttons">
            <a href="javascript:history.go(-1);">
                <div id="back" class="header-menu-link" data-back="false">
                </div>
            </a>
            <include file="_search" />
        </div>
        
    </header>
    <div class="mainWeiba">
    	<php>if(!$keyword){</php>
      	 	<p class="empty_list">请输入关键词进行搜索!</p>
        <php>}</php>
     	<php>if($keyword){</php>
            <!-- <div class="search-result">
                <span class="f9">搜索结果 : 找到 "<span class="post-tag">{$keyword}</span>" 相关帖子 {$searchResult.count} 个</span>
            </div> -->
        	<php>if($searchResult['data']){</php>
                <div class="weiba_postlist" style="position:relative">
              		<ul id="listData">
               			<volist name="searchResult['data']" id="vo">
                			<li onclick="javascript:window.open('{:addons_url('Weiba://Wap/postDetail',array('post_id'=>$vo['post_id']))}','_self')">
                    		<div class="name">
                            	<a href="{:addons_url('Weiba://Wap/postDetail',array('post_id'=>$vo['post_id']))}">
                        		<if condition="$vo['tag_id']"><span class="blue">[ {$vo.tag_name} ]</span></if>
                        		<span>{$vo.title}</span>
                                <php>if($vo['attach']){</php><i class="ico-bar-attach">&nbsp;</i><php>}</php>
                                <!--<php>if($vo['is_img']){</php><i class="ico-bar-image">&nbsp;</i><php>}</php>-->
                                </a>
                    		</div>
                            <php>if($vo['image']){</php> 
                            <a class="weiba_postlist_pics" href="{:addons_url('Weiba://Wap/postDetail',array('post_id'=>$vo['post_id']))}">
                            <div class="ninepic_list">
                                <volist name="vo['image']" id="vo2">
                                    <lt name="i" value="4">
                                     <span><img src="{$vo2}"/></span>
                                    </lt>
                                </volist>
                                
                            </div>
                            </a>
                            <php>}</php> 
                            <div class="info clearfix">
                                <div class="left">
                                    <a href="{:addons_url('Weiba://Wap/profile','uid='.$vo['post_uid'])}">
                                    <img height="16" width="16" src="{$vo['user']['avatar_small']}"/>
                                    {$vo['user']['uname']}
                                    </a><!--&nbsp;-&nbsp;<span>{$vo.post_time|friendlyDate}</span>-->
                                </div>
                                <div class="right">
                                <php>if($vo['read_count']>0){</php><span class="llnum">{$vo.read_count}</span><php>}if($vo['reply_count']>0){</php><span class="plnum">{$vo.reply_count}</span><php>}</php>
                                </div>
                            </div>
                			</li>
             			</volist>
                  	</ul>
                  <php>if($searchResult['totalPages']>1):</php>
                 	 <a id="load_page_btn" href="javascript:;" data-key="p" data-page="{$searchResult['totalPages']}" data-url="{:addons_url('Weiba://Search/post',array('t'=>3,'a'=>'public','k'=>$keyword,'scity'=>$scity,'sch'=>$sch,'qdr'=>$qdr))}">下一页</a>
                 	 <div class="no_more_data">没有更多数据了</div>	
                  	 <div class="page_loading">正在加载中...</div>
                  <php>endif;</php>
             </div>
             <php>}else{</php>
                <div class="note"><div class="note_empty"></div><p>对不起，没有找到匹配结果。</p></div>
             <php>}</php>
         <php>}</php>
    </div>
    
  </div>
</div>
<script type="text/javascript">
loadPageByMore(null,function(data){
	//高亮搜索词
	//$('.name span').highlight( '{$keyword}' );
});
</script>
<include file="../Public/footer" />